import {request} from "@/api/index";
import type {ApplicationPortal, BusinessReleases, Showshop} from "@/api/more/model/indel";
// import type {Shuju} from "@/api/more/model/indel";

//冀商发布
function getFb(){
    return request({
        method:'get',
        url:'/frontend/jsPublicize/randomList',
        data:{
            pageSize:8,
            pageNum:1,
            uuid:1
        }
    })
}
//冀商传奇
function getCq(){
    return request({
        method:'get',
        url:'/jsMemoir/page',
        data:{
            jsBusinessType:'js_publish',
            pageNum:1,
            pageSize:10
        }
    })
}
//搜索
function getSearch(){
    return request({
        method:'get',
        url:'/frontend/jsHome/homeSearch'
    })
}
//商品列表
function getShowList(){
    return request({
        method:'get',
        url:'/jsIntegral/shop/list',
    })
}

//获取转盘商品列表
function turntable(){
    return request({
        method:'get',
        url:'/jsIntegral/shop/shopId/?shopId'
    })
}

//
function captcha(){
    return request({
        method:'get',
        url:'/captchaImage'
    })
}

//业务审核
function Business(data:BusinessReleases){
    return request({
        method:'post',
        url:'/frontend/jsRelease',
        data:data
    })
}
//申请入口
function application(data:ApplicationPortal){
    return request({
        method:'post',
        url:'/frontend/jsApplication',
        data:data
    })
}
// function application(data:ApplicationPortal){
//     return request({
//         method:'post',
//         url:'/jsApplication',
//         data:data
//         // data:{
//         //     applicationId:Math.floor(Math.random() * 100000)
//         // }
//     })
// }
//获取大转盘正在进行的活动详情
export function detail(){
    return request({
        method:'get',
        url:'/frontend/jsActivity/info'
    })
}

//显示中奖物品
export function displayTheProduct(id:Showshop){
    return request({
        method:'get',
        url:`/frontend/jsActivity/roll/list/${id}`
    })
}

//查询申请列表
export function applicationlist(){
    return request({
        method:'get',
        url:'/frontend/jsApplication/page',
        data:{
            // requestUserId:,
            pageSize:100,
            pageNum:1
        }
    })
}

//查询业务发布申请列表
export function businesslist(){
    return request({
        method:'get',
        url:'/frontend/jsRelease/page',
        data:{
            pageSize:100,
            pageNum:1
        }
    })
}

export {getFb,getCq,getSearch,getShowList,turntable,captcha,application,Business}